@layout('base')

@section('content')
<h1>Wiki</h1>
<div class="row">
    <div class="span8 well well-large">
        <h2 class="title">{{ $entry->title }}</h2>
        {{ $entry->content }}
    </div>
    <div class="span3">
        <p>
            <i class="icon-edit"></i> <a href="{{ URL::to_route('edit_entry', array($entry->id)) }}">
            {{ Lang::line('global.edit', array('entity' => Lang::line('wiki::global.entry')->get()))->get() }}
        </a>
        </p>
        @if (is_object($entry->user))
        <p>
            <i class="icon-pencil"></i> {{ $entry->user->name }}
        </p>
        @endif
        <p>
            <i class="icon-time"></i> {{ date('d.m.Y', strtotime($entry->created_at)) }}
        </p>
        <h4>{{ Lang::line('wiki::global.categories')->get() }}</h4>

        <p><i class="icon-folder-open"></i>
            @foreach ($entry->categories()->get() as $category)
            <span class="label label-info">{{ $category->category }}</span>
            @endforeach
        </p>
        <h4>{{ Lang::line('wiki::global.tags')->get() }}</h4>

        <p><i class="icon-tags"></i>
            @foreach ($entry->tags()->get() as $tag)
            <span class="label">{{ $tag->tag }}</span>
            @endforeach
        </p>
    </div>
</div>
@endsection
@section('scripts')
{{ HTML::script('js/jquery/chosen.min.js') }}
{{ HTML::script('bundles/wiki/js/script.js') }}
@endsection